package com.xs.designpattern;

import lombok.extern.slf4j.Slf4j;

/**
 * 平静状态的类
 * @author xs
 */

@Slf4j
public class PeacefulState implements State{
    private final Mammoth mammoth;

    public PeacefulState(Mammoth mammoth) {
        this.mammoth = mammoth;
    }

    @Override
    public void observe() {
        log.info("{} 平静祥和.", mammoth);
    }

    @Override
    public void onEnterState() {
        log.info("{} 平静下来.", mammoth);
    }
}
